filetype plugin on
filetype indent on
syntax on

set autoindent
set autoread
set bs=2
set cindent
set clipboard+=unnamed
set completeopt=longest,menu
"set cursorline
set encoding=utf-8
set expandtab
set fdm=manual
set fileencodings=utf-8
set fileformats=unix
set formatoptions=tcrqn
set hidden
set hlsearch
set incsearch
set nobackup
set nocompatible
set nofoldenable
set nowrap
set nu
set ruler
set shiftwidth=4
set showmatch
set showmatch
set smartindent
set tabstop=4
set tags+=tags
set termencoding=utf-8
set wildmenu

let Tlist_Ctags_Cmd='/usr/local/bin/ctags'
let Tlist_Exit_OnlyWindow=1
let Tlist_Show_One_File=1
let Tlist_Use_Right_Window=0
let Tlist_WinWidth=60
let g:C_MapLeader='@'
let g:completekey="<C-o>"

set completeopt=menuone,menu,longest
let g:OmniCpp_MayCompleteDot=1
let g:OmniCpp_MayCompleteArrow=1
let g:OmniCpp_MayCompleteScope=1
let g:OmniCpp_NamespaceSearch=1
let g:OmniCpp_GlobalScopeSearch=1 
let g:OmniCpp_ShowPrototypeInAbbr=1 
let g:OmniCpp_SelectFirstItem = 2
let g:WC_min_len=5

:map <C-p> :TlistToggle<CR>
:map <C-h> :AV<CR>

set paste


"" Key word color
hi Pmenu ctermbg=4
hi PmenuSel term=standout ctermfg=7 ctermbg=13
hi Search    term=standout ctermfg=33 ctermbg=4
hi Statement guibg=#003366 guifg=#99eeff ctermbg=7777 ctermfg=Yellow
hi Error term=standout ctermfg=0 ctermbg=3 guibg=Red

" C
au FileType c call LANG_C()
function LANG_C()
	"TlistToggle
	set tags+=~/.vim/tag/csys
endfunction


" C++
au FileType cpp call LANG_CPP()
function LANG_CPP()
	set tags+=~/.vim/tag/csys
	set tags+=~/.vim/tag/stltags
endfunction

" ctags -R --fields=+iaS --extra=+q
" ctags --langmap=c++:+.inl --c++-kinds=+p --fields=+iaS --extra=+fq -R .
